package com.java.easyExcel;

import com.alibaba.excel.EasyExcel;

import java.util.ArrayList;
import java.util.List;

public class export {

    public static void main(String[] args) {
        String filename = "D:\\01.xlsx";
        ArrayList<UserData> list = new ArrayList<>();
        for(int i=0;i<10;i++){
            UserData userData = new UserData();
            userData.setUid(i);
            userData.setName(i+"nacy");
            list.add(userData);
        }
        EasyExcel.write(filename,UserData.class).sheet("用户信息")
                .doWrite(list);

    }
}
